<template>
    <rx-dialog @handOk="onOk" @cancel="onCancel">
        <rx-layout>
            <div slot="center" style>
                <a-form-model ref="form"  :model="mdl" :rules = "rules">
                    <a-row>
                        <a-col :span="12">
                            <a-form-item :label="i18n('form.listSize','弹框大小')">
                                <a-radio-group :placeholder="i18n('form.listSize','弹框大小')" v-model="mdl.isMax">
                                    <a-radio value="YES">{{i18n('form.fullScreen','全屏')}}</a-radio>
                                    <a-radio value="NO">{{i18n('form.customSize','自定义大小')}}</a-radio>
                                </a-radio-group>
                            </a-form-item>
                        </a-col>
                    </a-row>
                    <a-row v-if="mdl.isMax=='NO'">
                        <a-col :span="12">
                            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.width','宽度')">
                                <a-input-number style="width:620px;" :placeholder="i18n('form.width','宽度')" v-model="mdl.width" :min="100" :max="1500"/>
                            </a-form-item>
                        </a-col>
                        <a-col :span="12">
                            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.height','高度')">
                                <a-input-number style="width:620px;" :placeholder="i18n('form.height','高度')" v-model="mdl.height" :min="100" :max="1500"/>
                            </a-form-item>
                        </a-col>
                    </a-row>
                </a-form-model>
            </div>
        </rx-layout>
    </rx-dialog>
</template>

<script>
import { RxGrid, Util,RxDialog} from "@lowcode/jpaas-common-lib";
export default {
    name: "ListMethodDialog",
    props:["layerid","destroy","config"],
    data() {
        return {
            labelCol: { span: 4 },
            wrapperCol: { span: 8 },
            mdl:{
                isMax:"YES",
                height:800,
                width:600,
            }
        }
    },
    created() {
        if(this.config){
            this.mdl=this.config;
        }
    },
    methods: {
        i18n(name, text, key) {
            return this.$ti18(name, text, "formBoListDialog", key);
        },
        onOk(){
            Util.closeWindow(this,'ok',this.mdl);
        },
        onCancel(){
            Util.closeWindow(this,'cancel');
        }
    },
    watch: {}
}
</script>

<style scoped>
</style>